package com.srcptit.tranning.toannt.btvn1;

public class So_thuannghich {
public static void main(String[]args){
	  int i = 100000;
	  int dem=0;
      while(i <= 999999){
          if(Thuannghich(i) == true) {dem++;
          System.out.println(i);
          }
          i++;
      }
      System.out.println("Vay co "+dem+" so thoa man.");
  }
  
  public static boolean Thuannghich(long n){
      long m, dao = 0;
      m = n;
      while(n > 0){
          dao = dao * 10 + n % 10;
          n /= 10;
      }
      if(dao == m) return true;
      return false;
}
}
